.. highlightlang:: us .. index:: @f{legend} .. _@f{legend}: @f{legend} ========== .. us.tag @f{legend} NOTREADYENGLISH fieldfunction Changed5100 Creates a legend for 1D and 2D datasets. .. function:: @f{legend} @f{Legend(DiagramName1, DiagramName2, ...)} @f{legend(DiagramName, DatasetIndex)} .. us.comment **Comment** The legend text for each dataset is set in the Configuration dialog field :ref:`data-properties-2d` of the corresponding dataset. The legend will be updates if the legend text or the dataset style is modified. If the legend text starts with an exclamation mark "!" the dataset will not be displayed in the legend. .. us.example **Example** ``@f{legend()}`` **Output**: .. image:: S:/uniplot-obj/images/Feldfunktion_Legend.* If you double-click the text object the following dialog box will be displayed: .. image:: S:/uniplot-obj/images/Textdialog_Feldfunktion_Legende.* A field function is always starting with characters "@f{" followed by the field function name followed by a parameter list in round brackets followed by a closing curly bracket "}". The field result is enclosed curly brackets "{...}". .. us.history **History** .. list-table:: :header-rows: 1 * - Version - Description * - 5.10.0 - If the legend text starts with an exclamation mark "!" the dataset will not be displayed in the legend. .. seealso:: :ref:`overview-field-functions`, :ref:`editupdate-fields`, :ref:`diagraminsert-field-function` :sub:`id-1817341`